
package com.nikmesoft.android.alwaysontime;

import com.nikmesoft.android.alwaysontime.daos.SmsMainDAO;
import com.nikmesoft.android.alwaysontime.daos.TasksDAO;
import com.nikmesoft.android.alwaysontime.helpers.SharedPreferencesHelper;
import android.app.Application;
import android.content.Context;

public class MyApplication extends Application
{
	public static String PACKAGE_NAME;
	public static int API_VERSION;
	private Context context;

	@Override
	public void onCreate()
	{	super.onCreate();
		initVariables();
		initSingletons();
	}

	protected void initSingletons()
	{	// init Helpers
		SharedPreferencesHelper.initInstance(context);
		// init daos
		SmsMainDAO.initInstance(this);
		TasksDAO.initInstance(this);		
	}

	protected void initVariables()
	{	context = getApplicationContext();
		PACKAGE_NAME = getPackageName();
		API_VERSION = android.os.Build.VERSION.SDK_INT;
	}
}
